package com.shycloud.mido.organ.api.feign;


import com.shycloud.mido.common.core.constant.ServiceNameConstants;
import com.shycloud.mido.common.core.util.R;
import com.shycloud.mido.organ.api.entity.StudentAmountEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * @author npc
 * @date 2018/6/22
 */
@FeignClient(value="shycloud-organ-biz")
public interface RemoteLoginService {
	/**
	 * 会员活跃积分操作
	 *
	 * @param code     策略code
	 * @param memberId 会员id
	 * @return
	 */ 
	@RequestMapping(method = RequestMethod.POST, value = "/loginvalidation/valid")
	Integer validation(@RequestParam("memberId") String memberId, @RequestParam("type") String type,
					   @RequestParam("code") String code);

	/**
	 * 会员所属机构数量
	 * @param id
	 * @return
	 */
	@GetMapping("getOrgNumber")
	Integer getOrgNumber(@RequestParam("id")  String id);

//	/**
//	 * 根据学生memberId，orgId查询课时数
//	 * @param memberId
//	 * @param orgId
//	 * @return organTeacherDTO
//	 */
//	@GetMapping("/studentaccount/getstudentaccount")
//	StudentAmountEntity queryAmountByStudent(@RequestParam("memberId") String memberId, @RequestParam("orgId") Integer orgId);
//
//	/**
//	 * 修改学生课时数(扣除)
//	 * @param memberId
//	 * @param orgId
//	 * @param amountNumber
//	 * @return R
//	 */
//	@GetMapping("/studentaccount/updateaccount")
//	R updateAmount(@RequestParam("memberId") String memberId, @RequestParam("orgId") Integer orgId, @RequestParam("amountNumber") Integer amountNumber);
//
//	/**
//	 * 学生课时数+1
//	 * @param memberId
//	 * @param orgId
//	 * @return R
//	 */
//	@GetMapping("/studentaccount/addaccount")
//	R addAccount(@RequestParam("memberId") String memberId, @RequestParam("orgId") Integer orgId);

}
